class CreateProjects < ActiveRecord::Migration
  def self.up
    create_table :projects do |t|
      t.string                  :name
      t.string                  :chs_name
      t.text                    :description
      t.string                  :state
      t.integer                 :priority, :default => 0
      t.date                    :start_time
      t.date                    :should_be_finish_time
      t.date                    :actually_finish_time
      t.references              :user, :null => false
      t.string                  :repo
      t.string                  :compile_folder
      t.string                  :key
      t.integer                 :current_issue_index, :default => 1
      t.integer                 :current_req_index, :default => 1

      t.timestamps
    end

    add_index "projects", ["id"], :name => "index_projects_on_id"
  end

  def self.down
    drop_table :projects
  end
end
